-module(state).
-compile(export_all).

-record(state, {socket, world}).

new(Socket, World) ->
    #state{socket = Socket, world = World}.
socket(State) ->
    State#state.socket.
socket(State, Socket) ->
    State#state{socket = Socket}.
world(State) ->
    State#state.world.
world(State, World) ->
    State#state{world = World}.
